package com.cz.fra.service.impl;

import java.io.IOException;
import java.io.InputStream;
import java.util.Properties;

import com.cz.fra.service.InitializeService;
import com.cz.fra.utils.Config;

public class InitializeServiceImpl implements InitializeService{

	private static InitializeServiceImpl instance;
	
	private InitializeServiceImpl(){};
	
	public static InitializeServiceImpl getInstance() {
		if (instance == null) {
			instance = new InitializeServiceImpl();
		}
		return instance;
	}
	
	public void readServerConfig() {
		InputStream in = this.getClass().getClassLoader().getResourceAsStream("/res/Config.properties");
		Properties pro = new Properties();  
        try {
			pro.load(in);
		} catch (IOException e) {
			e.printStackTrace();
		} 
        Config.SERVER_PICTURE_URL = pro.getProperty("server.picture.url");
	}

}
